import pymysql

con = pymysql.connect(host='localhost', user='root', password='admin123123', port=3306, db='guest', charset='utf8')
cur = con.cursor()
cur.execute('select * from sign_guest')
yes = cur.fetchall()
print(yes[0][1])
cur.close()     #关闭游标
con.close()     #关闭连接



# class Calculator():
#     def __init__(self, a, b):
#         self.a = int(a)
#         self.b = int(b)
#
#     def add(self):
#         return self.a + self.b
#
#     def sub(self):
#         return self.a - self.b
#
#     def mul(self):
#         return self.a * self.b
#
#     def div(self):
#         return self.a / self.b
#
#
